/**
 * 登录服务
 * 
 * @author lianchao
 */
// 创建登录模块
var jobDetailServiceApp = angular.module("jobDetailServiceApp", [ "commonApp" ]);

// 创建登录服务
jobDetailServiceApp.service("jobDetailService", [
		"commonService",
		function(commonService) {
			
			/**
			 * 新增子任务
			 */
			this.add = function(params, sback, eback) {
				commonService.call("tsp/jobDetail/add", params, sback, eback);
			}
			
			/**
			 * 查询子任务
			 */
			this.removeList = function(params, sback, eback) {
				commonService.call("tsp/jobDetail/deleteList", params, sback, eback);
			}
			
			/**
			 * 暂停子任务
			 */
			this.pause = function(params, sback, eback) {
				commonService.call("tsp/jobDetail/pause", params, sback, eback);
			}
			
			/**
			 * 批量暂停子任务
			 */
			this.pauseList = function(params, sback, eback) {
				commonService.call("tsp/jobDetail/pauseList", params, sback, eback);
			}
			
			/**
			 * 唤醒子任务
			 */
			this.resume = function(params, sback, eback) {
				commonService.call("tsp/jobDetail/resume", params, sback, eback);
			}
			
			/**
			 * 批量唤醒子任务
			 */
			this.resumeList = function(params, sback, eback) {
				commonService.call("tsp/jobDetail/resumeList", params, sback, eback);
			}
			
			/**
			 * 中断子任务
			 */
			this.interrupt = function(params, sback, eback) {
				commonService.call("tsp/jobDetail/interrupt", params, sback, eback);
			}
			
			/**
			 * 批量中断子任务
			 */
			this.interruptList = function(params, sback, eback) {
				commonService.call("tsp/jobDetail/interruptList", params, sback, eback);
			}
			
			/**
			 * 结束离线子任务
			 */
			this.finish = function(params, sback, eback) {
				commonService.call("tsp/jobDetail/finish", params, sback, eback);
			}
			
			/**
			 * 批量结束离线子任务
			 */
			this.finishList = function(params, sback, eback) {
				commonService.call("tsp/jobDetail/finishList", params, sback, eback);
			}
			
			
			/**
			 * 重置离线子任务
			 */
			this.reset = function(params, sback, eback) {
				commonService.call("tsp/jobDetail/reset", params, sback, eback);
			}
			
			/**
			 * 批量重置离线子任务
			 */
			this.resetList = function(params, sback, eback) {
				commonService.call("tsp/jobDetail/resetList", params, sback, eback);
			}
			
			/**
			 * 查询子任务
			 */
			this.queryPage = function(params, sback, eback) {
				commonService.call("tsp/jobDetail/queryPage", params, sback, eback);
			}
			
			/**
			 * 查询运行中子任务
			 */
			this.queryRunningPage = function(params, sback, eback) {
				commonService.call("tsp/jobDetail/queryRunningPage", params, sback, eback);
			}
			
			/**
			 * 查询待执行子任务
			 */
			this.queryWaitingPage = function(params, sback, eback) {
				commonService.call("tsp/jobDetail/queryWaitingPage", params, sback, eback);
			}
			
			/**
			 * 查询重试子任务
			 */
			this.queryRetryPage = function(params, sback, eback) {
				commonService.call("tsp/jobDetail/queryRetryPage", params, sback, eback);
			}
			
			/**
			 * 查询子任务线程信息
			 */
			this.queryThreadInfo = function(params, sback, eback) {
				commonService.call("tsp/jobDetail/queryThreadInfo", params, sback, eback);
			}
		}
]);